﻿
class SortUtilities
{
    public static void InsertionSort(int[] array)
    {
        int mainIterator, j, temp;
        for (mainIterator = 1; mainIterator < array.Length; mainIterator++)
        {
            j = mainIterator;
            temp = array[j];
            while (j > 0 && array[j - 1] > temp)
            {
                array[j] = array[j - 1];
                j--;
            }
            array[j] = temp;
        }
    }
}

